package com.kun.hosp.repository;

import com.kun.model.entity.hosp.Hospital;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

/**
 * @Author zhoukun
 * @Date 2021/5/1 17:45
 * 医院
 */
@Repository
public interface HospitalRepository extends MongoRepository<Hospital,String> {
    /**
     * 判断是否存在数据(根据hoscode查)
     * @param hoscode
     * @return
     */
   Hospital  getHospitalByHoscode(String hoscode);
    /**
     * 根据医院名称模糊查询医院列表
     */

    List<Hospital> findHospitalsByHosnameLike(String hosname);
}
